package com.xszx.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName t_contract
 */
@TableName(value ="t_contract")
@Data
public class TContract implements Serializable {
    /**
     * 合同id
     */
    @TableId(type = IdType.AUTO)
    private Long cid;

    /**
     * 合同名称
     */
    private String cname;

    /**
     * 合同类型
     */
    private String ctype;

    /**
     * 甲方名称
     */
    private String armorName;

    /**
     * 甲方联系方式
     */
    private String armorPhone;

    /**
     * 甲方部门
     */
    private String armorDept;

    /**
     * 乙方名称
     */
    private String secondName;

    /**
     * 乙方联系方式
     */
    private String secondPhone;

    /**
     * 乙方部门
     */
    private String secondDept;

    /**
     * 创建部门
     */
    private String createname;

    /**
     * 创建日期
     */
    private Date createdate;

    /**
     * 合同状态
     */
    private String cstatus;

    /**
     * 资产ID
     */
    private Long aid;

    /**
     * 资产名称
     */
    private String aname;

    /**
     * 规格型号
     */
    private String aserial;

    /**
     * 资产编号
     */
    private long acode;

    /**
     * 资产原价
     */
    private double aprice;

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        TContract other = (TContract) that;
        return (this.getCid() == null ? other.getCid() == null : this.getCid().equals(other.getCid()))
            && (this.getCname() == null ? other.getCname() == null : this.getCname().equals(other.getCname()))
            && (this.getCtype() == null ? other.getCtype() == null : this.getCtype().equals(other.getCtype()))
            && (this.getArmorName() == null ? other.getArmorName() == null : this.getArmorName().equals(other.getArmorName()))
            && (this.getArmorPhone() == null ? other.getArmorPhone() == null : this.getArmorPhone().equals(other.getArmorPhone()))
            && (this.getArmorDept() == null ? other.getArmorDept() == null : this.getArmorDept().equals(other.getArmorDept()))
            && (this.getSecondName() == null ? other.getSecondName() == null : this.getSecondName().equals(other.getSecondName()))
            && (this.getSecondPhone() == null ? other.getSecondPhone() == null : this.getSecondPhone().equals(other.getSecondPhone()))
            && (this.getSecondDept() == null ? other.getSecondDept() == null : this.getSecondDept().equals(other.getSecondDept()))
            && (this.getCreatename() == null ? other.getCreatename() == null : this.getCreatename().equals(other.getCreatename()))
            && (this.getCreatedate() == null ? other.getCreatedate() == null : this.getCreatedate().equals(other.getCreatedate()))
            && (this.getCstatus() == null ? other.getCstatus() == null : this.getCstatus().equals(other.getCstatus()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getCid() == null) ? 0 : getCid().hashCode());
        result = prime * result + ((getCname() == null) ? 0 : getCname().hashCode());
        result = prime * result + ((getCtype() == null) ? 0 : getCtype().hashCode());
        result = prime * result + ((getArmorName() == null) ? 0 : getArmorName().hashCode());
        result = prime * result + ((getArmorPhone() == null) ? 0 : getArmorPhone().hashCode());
        result = prime * result + ((getArmorDept() == null) ? 0 : getArmorDept().hashCode());
        result = prime * result + ((getSecondName() == null) ? 0 : getSecondName().hashCode());
        result = prime * result + ((getSecondPhone() == null) ? 0 : getSecondPhone().hashCode());
        result = prime * result + ((getSecondDept() == null) ? 0 : getSecondDept().hashCode());
        result = prime * result + ((getCreatename() == null) ? 0 : getCreatename().hashCode());
        result = prime * result + ((getCreatedate() == null) ? 0 : getCreatedate().hashCode());
        result = prime * result + ((getCstatus() == null) ? 0 : getCstatus().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", cid=").append(cid);
        sb.append(", cname=").append(cname);
        sb.append(", ctype=").append(ctype);
        sb.append(", armorName=").append(armorName);
        sb.append(", armorPhone=").append(armorPhone);
        sb.append(", armorDept=").append(armorDept);
        sb.append(", secondName=").append(secondName);
        sb.append(", secondPhone=").append(secondPhone);
        sb.append(", secondDept=").append(secondDept);
        sb.append(", createname=").append(createname);
        sb.append(", createdate=").append(createdate);
        sb.append(", cstatus=").append(cstatus);
        sb.append(", aname=").append(aname);
        sb.append(", aserial=").append(aserial);
        sb.append(", acode=").append(acode);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}